#ifndef SYSSETWIDGET_H
#define SYSSETWIDGET_H

#include <QWidget>

#include <QObject>

class ICommunicationStrategy;
class IProtocol;
class CommunicationService;

namespace Ui {
class SysSetWidget;
}

class SysSetWidget : public QWidget
{
    Q_OBJECT

public:
    explicit SysSetWidget(QWidget *parent = nullptr);
    ~SysSetWidget();

public slots:
    bool onOpenPort();
private slots:
    void on_btn_update_com_clicked();

    void on_btn_state_clicked();

signals:
    void rxCard(const QString &card);   // 发送卡号

private:
    Ui::SysSetWidget *ui;

    // 串口
    bool btn_state_switch = false;

    ICommunicationStrategy *m_strategy;
    IProtocol  *m_protocol;
    CommunicationService *m_commService;
};

#endif // SYSSETWIDGET_H
